#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2016-04-08 16:04:19
# @Author  : Gtlions Lai (gtlions.l@qq.com)
# @Link    : http://blog.csdn.net/gtlions
# @Version : 1.0.0
"""summarization ahout this script.

detail ahout this script

    Class(): summarization about Class
    ...
    function(): summarization about function
    ...
"""

from app import db

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(20), unique=True)
    email = db.Column(db.String(50), unique=True)

    def __init__(self, name, email):
        self.name = name
        self.email = email
    
    def __repr__(self):
        return '<User %r>' %self.name

    def save(self):
        db.session.add(self)
        db.session.commit()



























